#include <bits/stdc++.h>

using namespace std;
int n;
int r[120000];
struct block {
    int rv = -1;
    int c = 0;
    int at = 0;
} b[120000];
int bcnt;
int lf;

int main() {
    freopen("duel.in", "r", stdin);
    freopen("duel.out", "w", stdout);
    scanf("%d", &n);
    lf = n;
    for (int i = 1; i <= n; i++) {
        scanf("%d", &r[i]);
    }
    sort(r + 1, r + n + 1);
    for (int i = 1; i <= n; i++) {
        if (r[i] != r[i - 1]) {
            b[++bcnt].rv = r[i];
            b[bcnt].c++;
            b[bcnt].at++;
        } else {
            b[bcnt].c++;
            b[bcnt].at++;
        }
    }
    for (int i = 1; i <= bcnt; i++) {
        int iu = i + 1;
        while (b[i].c > 0) {
            if (b[iu].at > 0) {
                b[i].c--;
                b[i].at--;
                b[iu].at--;
                lf--;
            } else if (iu >= bcnt) {
                break;
            } else {
                iu++;
            }
        }
    }
    cout << lf << endl;
    return 0;
}

